require(['jquery',"bbcare",'scprit/patientsQuestionnaire/vm/common.js',
	'scprit/patientsQuestionnaire/vm/success.ui.js',
	'scprit/patientsQuestionnaire/vm/success.event.js'],function($,$bb,$common,$ui,$event){
	var submitStatus = JSON.parse(localStorage.getItem("submitStatus"));
	localStorage.removeItem("patientInfo");
	localStorage.removeItem("submitStatus");
	if(submitStatus.success){
		//wxf如果是---GLE基础问卷，则下一套问卷跳转到：LES
		//-------LES职业紧张， 则下一套跳转到：OSI
		submitStatus.data.evaTitle = submitStatus.data.evaType == "LES"? "职业压力紧张问卷":submitStatus.data.evaType == "GLE"?"生活事件量表":"";
		//如果是---GLE基础问卷，则下一套问卷跳转到：LES
		//---------LES职业紧张，则下一套跳转到：OSI
		submitStatus.data.nextType = submitStatus.data.evaType == "LES"? "OSI":submitStatus.data.evaType == "GLE"?"LES":"";
		
		
		$ui.successInit({"dom":"#status","data":submitStatus});
		if(submitStatus.data.evaType == "LES"){
			$("#data-toggle").attr("data-toggle" ,"dropdown");
		}
	}else{
		$ui.failureInit({"dom":"#status","data":submitStatus});
	}
	$event.init();
});
